call %wsr%\Scripts\lz.cmd

rem 如果有第二个参数，切换当前目录到参数指定目录
if not "%2"=="" cd /d %2

rem 根据第一个参数选择如何运行
if "%1" == "cmd" (
    rem 加入 clink 支持。
    rem start /b cmd /K "%wsr%\Program\clink\clink_x64.exe inject"
    start /b cmd /K "clink inject > nul"
    exit
) else if "%1" == "ps" (
    rem cmd 窗口中运行 powershell。
    start /b powershell -noexit -nologo -mta -ExecutionPolicy RemoteSigned^
            -OutputFormat Text^
            -File %wsr%\Scripts\powershellcfg.ps1
    exit
) else if "%1" == "powershell" (
    rem 运行 powershell。
    start powershell -noexit -nologo -ExecutionPolicy RemoteSigned -mta^
            -File %wsr%\Scripts\powershellcfg.ps1
    exit
) else (
    rem 默认运行 powershell。
    start powershell -noexit -nologo -ExecutionPolicy RemoteSigned -mta^
            -File %wsr%\Scripts\powershellcfg.ps1
    exit
)
